package com.shop.shoporder.service.impl;

import com.shop.shoporder.entity.Category;
import com.shop.shoporder.entity.SubCategory;
import com.shop.shoporder.entity.WapClassificationGoodsListToData;
import com.shop.shoporder.entity.WapClassificationToData;
import com.shop.shoporder.mapper.WapClassificationMapper;
import com.shop.shoporder.service.WapClassificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("wapClassificationService")
public class WapClassificationServiceImpl implements WapClassificationService {

    @Autowired
    WapClassificationMapper wapClassificationMapper;

    @Override
    public List<WapClassificationToData> selectOneLevelByPId() throws Exception {
        return wapClassificationMapper.selectOneLevelByPId();
    }


    @Override
    public List<WapClassificationToData> selectTwoLevelByPId() throws Exception{
        return wapClassificationMapper.selectTwoLevelByPId();
    }

    @Override
    public List<WapClassificationGoodsListToData> selectGoodsByCfId2(int cfId2) throws Exception {
        return wapClassificationMapper.selectGoodsByCfId2(cfId2);
    }

    @Override
    public List<Category> getCategoryList() throws Exception {
        return wapClassificationMapper.getCategoryList();
    }

    @Override
    public List<SubCategory> getSubCategoryList(int categoryId) throws Exception {
        return wapClassificationMapper.getSubCategoryList(categoryId);
    }


}
